package com.protobuf;

import java.io.IOException;

public class GenerateClass {
	
	
	public static void main(String[] args) {
        String protoFile = "user2.proto";//  
        String strCmd = "D:/DownLoad/protoc-3.5.1-win32/bin/protoc.exe --java_out=./src/main/java ./src/main/resources/"+ protoFile;  
        try {
            Runtime.getRuntime().exec(strCmd);
        } catch (IOException e) {
            e.printStackTrace();
        }//通过执行cmd命令调用protoc.exe程序  
    }

}
